import time

from selenium import webdriver
from selenium.webdriver.chrome.service import Service

if __name__ == '__main__':
    url = "http://www.baidu.com"

    executable_path = "../drivers/chromedriver.exe"

    service = Service(executable_path=executable_path)
    browser = webdriver.Chrome(service=service)

    browser.get(url=url)
    # 睡眠 10 秒，然后继续
    # 设置窗口左上角所在位置
    browser.set_window_rect(800, 600)
    # 设置窗口大小
    browser.set_window_size(1920, 1080)

    time.sleep(10)

    browser.quit()
